import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';
import { IndexComponent } from './index/index.component';
import { SoftPicComponent } from './soft-pic/soft-pic.component';
import { SoftUpdateComponent } from './soft-update/soft-update.component';
import { OtherProductComponent } from './other-product/other-product.component';
import { SoftDownloadComponent } from './soft-download/soft-download.component';
import { EditorComponent } from './editor/editor.component';


const routes: Routes = [
  {
    path: '', component: HomeComponent,
    children: [
      { path: '', redirectTo: 'index', pathMatch: 'full' },
      { path: 'index', component: IndexComponent },
      { path: 'softDownload', component: SoftDownloadComponent },
      { path: 'softPic', component: SoftPicComponent },
      { path: 'softUpdate', component: SoftUpdateComponent },
      { path: 'otherProduct', component: OtherProductComponent },
      { path: 'editor', component: EditorComponent }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class HomeRoutingModule { }
